import React, { Component } from 'react';
import "../styles/MyEntry.scss"

class MyEntry extends Component {
    constructor(props) {
        super(props);
        this.state = {
            navslist: []
        }
    }
    render() {
        return (
            <div className='myentry'>
                {
                    this.props.navslist.map((item, index) => {
                        return (
                            <div className="nav" key={index}>
                                <img src={item.pic} alt="" />
                                <div className="name">{item.name}</div>
                            </div>
                        )
                    })
                }
                {
                    this.props.navslist.length === 0 && <div className="empty">网络异常,请重新刷新页面!</div>
                }
            </div>
        );
    }
}

export default MyEntry;